function loadInfoDetail(){
    var myObject = JSON.parse(window.webConnector.getResult());
    jQuery(".ui-page-active #detail-item").html(myObject.data);
    jQuery(".ui-page-active #detail-title").html(myObject.title);
    jQuery(".ui-page-active #bookmark-data").attr("data-nid", myObject.nid);
    jQuery(".ui-page-active #bookmark-data").attr("data-title", myObject.title);

    var checkExist = window.webConnector.checkExistBookmark(myObject.nid);

    if(checkExist == "1") {
        jQuery("#bookmark-data").append("<div>đã yêu thích</div>");
        jQuery("#bookmark-data").remove();

    }
    else {
        jQuery("#bookmark-data").attr("data-status","0");
        jQuery("#bookmark-data").text("yêu thích");
    }
}

jQuery(document).ready(function() {
    jQuery("#bookmark-data").click(function(e) {
        var nid = jQuery(this).attr("data-nid");
        var ttl = jQuery(this).attr("data-title");
        var stt = jQuery(this).attr("data-status");

        jQuery(this).append("<div>đã yêu thích</div>");
        jQuery(this).remove();
        jQuery(".action-wrapper").remove();
        var htmlTxt = "<div class='node-full-wrapper'><a href='#' class='bookmark-data' data-nid='"+nid+"' data-title='"+ttl+"' data-status='1'>bỏ yêu thích</a>"+jQuery(".node-full-wrapper").html()+"</div>";

        window.webConnector.addBookmark(htmlTxt, nid, ttl);

        e.preventDefault();
    });
});